#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int cmp_int(const void* e1, const void* e2)
{
	return *((int*)e1) - *((int*)e2);
}
int cmp_char(const void* e1, const void* e2)
{
	return strcmp(((char*)e1), ((char*)e2));
}
int main()
{
	int arr[10] = { 9,8,7,6,5,4,3,2,1,0 };
	char str[] = "gfedcba";
	qsort(arr,10,sizeof(arr[0]),cmp_int);
	for (int i = 0; i < 10; i++)
	{
		printf("%d ", arr[i]);
	}
	printf("\n");
	qsort(str, 7, sizeof(str[0]), cmp_char);
	for (int i = 0; i < 7; i++)
	{
		printf("%c", str[i]);
	}
	return 0;
}